package com.spt.springbootzhsx.service.suggest.Get_UserWatchList_4;

import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.fs.Path;
import org.apache.hadoop.io.Text;
import org.apache.hadoop.mapreduce.Job;
import org.apache.hadoop.mapreduce.lib.input.FileInputFormat;
import org.apache.hadoop.mapreduce.lib.output.FileOutputFormat;

/**
 * 计算用户观影向量
 */
public class GetMWL_Main {
    public static void domain() throws Exception {
        Configuration conf = new Configuration();

        Job job=Job.getInstance(conf,"计算用户观影向量");
        job.setJarByClass(GetMWL_Main.class);
        job.setMapperClass(GetMWL_Mapper.class);
        job.setReducerClass(GetMWL_Reducer.class);
        job.setOutputKeyClass(Text.class);
        job.setOutputValueClass(Text.class);

        FileInputFormat.setInputPaths(job,new Path("src/main/java/com/spt/springbootzhsx/service/suggest/suggestOut/input/rate.txt"));
        FileOutputFormat.setOutputPath(job,new Path("src/main/java/com/spt/springbootzhsx/service/suggest/suggestOut/output/step04"));
        job.waitForCompletion(true);
    }
}
